﻿using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
using Netduino4Fun.Framework.Log;
using Netduino4Fun.DesktopAssistant.Netduino.Communication;

namespace Netduino4Fun.DesktopAssistant.Netduino
{
    public class Program
    {
        public static void Main()
        {
            Connection connection = new SerialConnection();
            IAppender appender 
                    = new PCAppender(connection);
                    //= new MemoryAppender();
            Log log = new Log(appender);

            try
            {
                new DesktopAssistant(connection, log).Start();
            }
            catch (Exception e)
            {
                log.Write(e.Message);
                log.Write(e.StackTrace);
            }


        }

    }
}
